
$ShouldExecutePatchClass = New-PSClass ShouldExecutePatch -inherit $PSSqlCommandClass {
	
	Constructor {
		Base $Args[0]
		
		$this.Command.CommandType = [System.Data.CommandType]::Text
		$this.Command.CommandText = @"
	SELECT Count(*)
	  FROM [DBFramework].[FileControl]
     WHERE FilePath = @FilePath
       AND CheckSum = @CheckSum
"@
		[void] $this.Command.Parameters.Add("@FilePath",$null)
		[void] $this.Command.Parameters.Add("@CheckSum",$null)
	}

    method Execute {
		$this.Command.Parameters["@FilePath"].Value = $Args[0]
		$this.Command.Parameters["@CheckSum"].Value = $Args[1]
		$this.Command.ExecuteScalar() -eq 0
	}
}

